{extend name="./oscshop/admin/view/public/base.html" /}
{block name="content"}
<div class="page-header">
	<h1>	
		{$breadcrumb1}
		<small>
			<i class="ace-icon fa fa-angle-double-right"></i>
			{$breadcrumb3}
		</small>
	</h1>
</div>

<form action="{:url('ContractIncrease/bonus_new')}" method="get">
	<table class="table table-striped table-bordered table-hover search-form">
		<thead>
		<tr>
			<th>
				<input name="username" type="number" placeholder="输入用户名" value="{:input('param.username')}" />
				<button class="btn btn-primary">查询</button>&nbsp;&nbsp;&nbsp;
				<a href="{:url('ContractIncrease/bonus_new')}" class="btn btn-primary">清空查询条件</a>
				&nbsp;&nbsp;&nbsp;
			</th>
		</tr>
		</thead>
	</table>
</form>
<form id="myForm" action="{:url('ContractIncrease/add_bonus')}" method="post">
	<table class="table table-striped table-bordered table-hover">
		<thead>
			<tr>
				<th>
					<input name="username" type="number" placeholder="输入用户名" value="" />
					&nbsp;&nbsp;&nbsp;
					<input name="money" type="number" step="0.01" placeholder="输入金额,可随意填写" value="" />
					&nbsp;&nbsp;&nbsp;
					<button class="btn btn-primary batch">新增</button>
				</th>
			</tr>
		</thead>
	</table>
</form>

<div class="row">
	<div class="col-xs-12">
		<div class="table-responsive">
			<table id="con_table" class="table table-striped table-bordered table-hover">
				<thead>
					<tr>
						<th>姓名</th>
						<th>用户名</th>
						<th>金额</th>
						<th>操作</th>
					</tr>
				</thead>
				<tbody>
					{volist name="list" id="v"}
					<tr>
						<td>{:get_member_idcardname($v.username)}</td>
						<td>{$v.username}</td>
						<td>{$v.money}</td>
						<td>
							<a class="delete btn btn-xs btn-danger" href="/admin/ContractIncrease/del?username={$v.username}" title="删除">
								<i class="fa fa-trash bigger-120"></i>
							</a>
						</td>
					</tr>
					{/volist}
				</tbody>

			</table>
		</div>
		{$page}
	</div>
</div>
{/block}
{block name="javascript"}
<script>
	function topLeft(id){
		var judge = prompt("审批意见");
		if(judge){
			window.location.href = "repulse?id="+id+"&desc="+judge;
		}
	}

	$(function(){
	   	$(".search").click(function () {
			var url = $(this).attr('url');
			var query = $('.search-form').find('input,select').serialize();
			query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g, '');
			query = query.replace(/^&/g, '');
			if (url.indexOf('?') > 0) {
				url += '&' + query;
			} else {
				url += '?' + query;
			}
//		   	alert(url);
			window.location.href = url;
		});
	});

</script>
{/block}